
ord('A') #将字符转换成编码
chr(65) # 将编码转换成字符
int('101')  #101 字符串转换成int整数
int('1010', 2)  #101 将二进制数转换成10进制
bin(101)  #把10进制转换成2进制
str(10)   #强制转换成字符串类型
# 凯撒密码
s = 'helloxyz'
def gen_pwd(s):
    result = ''
    for i in s:
        # print(i)
        num = ord(i)+3
        num = (num-97)%26+97
        result+=chr(num)
    print(result)
gen_pwd(s)